﻿using System;
using Abp.Domain.Entities.Auditing;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using FwProject.Authorization.Users;
using FwProject.Core.TypeNumber;
using FwProject.Core.Restaurant;
using FwProject.EFCoreAttribut;

namespace FwProject.Core.Restaurant
{
    /// <summary>
    /// 餐厅绑定的型号
    /// </summary>
    [Table("RestaurantTypenNumberInfo")]
    public class RestaurantTypenNumberInfo: FullAuditedEntity<Guid>
    {
        /// <summary>
        /// 工厂编号
        /// </summary>
        public Guid? FactoryinfoId { get; set; }
        /// <summary>
        /// 型号编号
        /// </summary>
        /// <value>The type number identifier.</value>
        public Guid? TypeNumberId { get; set; }
        [ForeignKey("TypeNumberId")]
        public virtual TypeNumberInfo TypeNumberInfoModel { get; set; }
        [Required]
        /// <summary>
        /// 单价
        /// </summary>
        /// <value>The price.</value>
        //[DecimalPrecision(18,4)]
        public decimal Price { get; set; } = 0;
       /// <summary>
       /// 餐厅编号
       /// </summary>
       /// <value>The restaurantid.</value>
        public Guid?  Restaurantid { get; set; }

        [ForeignKey("Restaurantid")]
        public virtual RestaurantInfo RestaurantInfoModel { get; set; }

        public bool IsDefault { get; set; } = true;
        
    }
}
